/**
 * MyDemoActivity.java
 * Copyright(C) 2014
 * creator:cuiran 2014-6-23 下午6:04:28
 */
package org.videolan.vlc.gui;

import org.videolan.vlc.gui.video.MySurfaceInfo;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.FrameLayout;

/**
 * 自定义播放器  测试
 * @author cuiran
 * @version 1.0.0
 */
public class MyDemoActivity extends Activity {
	private ViewGroup viewGroup;
	
	 @Override
	 public void onCreate(Bundle savedInstanceState) {
		 super.onCreate(savedInstanceState);
		 viewGroup = new FrameLayout(getApplicationContext()); // 创建控件容器，显示布局
		 
			// 隐藏导航条
		 sendBroadcast(new Intent("com.android.action.HIDE_BAR"));
		
		 viewGroup.setLayoutParams(new LayoutParams(1920, 1080)); // 设置容器的宽高
		 MySurfaceInfo surfaceInfo=new MySurfaceInfo();
		 viewGroup.addView(surfaceInfo.getView(this));
		 String bk_file_path="/sata/media/bg.jpg";
		 Bitmap bk_bitmap = BitmapFactory.decodeFile(bk_file_path);
		 BitmapDrawable bk_drawable = new BitmapDrawable(bk_bitmap);
		 viewGroup.setBackgroundDrawable(bk_drawable);// 设置模板背景图片
		 setContentView(viewGroup);
		 
		 
	 }
	
}
